package com.zhangkunhao.notes.util;

import java.util.Objects;

/**
 * 进行非空与不出现空格判断的工具类
 *
 * @author 张坤浩
 */
public class IfValidValueJudgeUtil {
    public static boolean judge(Object... obj) {
        if (Objects.nonNull(obj)) {
            for (Object o : obj) {
                if (Objects.isNull(o) || o == "") {
                    return false;
                } else if (o instanceof String) {
                    String obj1 = (String) o;
                    for (int j = 0; j < obj1.length(); j++) {
                        if (obj1.charAt(j) == ' ') {
                            return false;
                        }
                    }
                }
            }
        } else {
            return false;
        }
        return true;
    }
}
